
package com.example.cia.service;

import com.example.cia.support.HttpService;

public class addSightsService implements Service{
	
	boolean flag;
	
	public addSightsService(){
		flag = false;
	}
	
	/*
	 * 添加景点，调用httpService发送request
	 */
	public int addSights(String description){		
		String result;		
		HttpService<String> addSights;
		addSights = new HttpService<String>();
		addSights.setData(description);
		addSights.setUrl("/CIADatabse/addSightsServlet");
		addSights.doHttpGet();
		addSights.setService(this);
		while(true){
			if(!flag);
			else
				break;
		}
		result = addSights.getResult();
		return Integer.parseInt(result);
	}
	
	@Override
	public void setFlag(boolean b){
			flag = b;
	}

}
